package frontera;

import control.ClientesCTR;
import control.DetallesCTR;
import control.ServiciosCTR;
import entidad.Clientes;
import entidad.Servicios;
import entidad.TiposServicios;
import entidad.MovimientoDetalles;
import entidad.Movimientos;
import java.util.Date;
import javax.swing.JOptionPane;
import javax.swing.table.DefaultTableModel;

public class MovimientosGUI extends javax.swing.JPanel {
    ClientesCTR controlC = new ClientesCTR();
    ServiciosCTR controlS = new ServiciosCTR();
    DetallesCTR controlD = new DetallesCTR();
    Movimientos movimiento;//Almacena el movimiento del usuario seleccionado

    /** Creates new form MovimientosGUI */
    public MovimientosGUI() {
        initComponents();
        fechaEntrada.setText(new Date().toString());
        cargarTiposServicios();
    }

    /**
     * cargarTiposServicios
     * Carga la lista de Tipos de Servicios
     */
    public void cargarTiposServicios(){
        ListaTiposServicios.removeAllItems();
        for(TiposServicios u : FramePrincipal1.sistema.getTiposServicios()){
            ListaTiposServicios.addItem(u.getNombre());
        }
    }

    /**
     * cargarListaServicios
     * Carga la lista de Servicios disponibles
     * dependiendo del Tipo seleccionado
     */
    private void cargarListaServicios(int id){
        ListaServicios.removeAllItems();
        for(Servicios u : FramePrincipal1.sistema.getServicios()){
            if(u.getTipoServicio().getId()==id && u.isEstado()){
                ListaServicios.addItem(u.getNombre());
                //System.out.println(u.getNombre());
            }
        }
    }

    /**
     * verInfoServicio
     * Visualiza la información de un servicio seleccionado
     */
    private void verInfoServicio(){
        if(ListaServicios.getSelectedItem()!=null){
            Servicios t = controlS.getServicioByNombre(ListaServicios.getSelectedItem().toString());
            if(t != null){
                iva.setText(Integer.toString(t.getIva()));
                valorUnitario.setText(Integer.toString(t.getValorUnitario()));
                float total = t.getValorUnitario() * Integer.parseInt(cantidad.getText()) * t.getIva() / 100;
                valorTotal.setText(Double.toString(total + t.getValorUnitario()));
            }
        }
    }

    /**
     * buscarCliente
     * Busca si el Cliente digitado se encuentra registrado (CheckIn)
     * y visualiza la info y llena la grilla de servicios consumidos.
     * De lo contrario visualiza una ventana para crearlo
     */
    private void buscarCliente(){
        if(!documento.getText().trim().equals("")){
            Clientes c = controlC.validarCheckInCliente(Integer.parseInt(documento.getText().trim()));
            if(c!=null){
                movimiento = controlD.getMovimientoByCC(c.getCedula());//Obtengo el movimiento activo del Cliente
                if(movimiento != null){
                    nombreCliente.setText(c.getNombre());
                    cedula.setText(Integer.toString(c.getCedula()));
                    fechaEntrada.setText(movimiento.getFechaIni().toString());
                    cargarServiciosConsumidos(c.getCedula());
                }else JOptionPane.showMessageDialog(this, "No se encontró un CheckIn para este cliente.");
            }else{
                JOptionPane.showMessageDialog(this, "El cliente No se encuentra registrado en el Hotel.");
            }
        }else JOptionPane.showMessageDialog(this, "Digite la cedula del Cliente a buscar.");
    }

    /**
     * cargarServiciosConsumidos
     * Visualiza en la grilla la lista de
     * servicios que está consumiendo un Cliente
     */
    private void cargarServiciosConsumidos(int cc){
        DefaultTableModel _data = new DefaultTableModel(new Object []{"Servicio","Cantidad","Valor","Total" },0);
        int totalFactura = 0;
        for(MovimientoDetalles m : FramePrincipal1.sistema.getDetalles()){
            if(m.getCliente().getCedula()==cc){
                String col1 = m.getServicios().getNombre();
                int col2 = m.getCantidad();
                int col3 = m.getServicios().getValorUnitario();
                int col4 = m.getValorTotal();
                totalFactura += m.getValorTotal();
                _data.addRow(new Object []{col1,col2,col3,col4}) ;
            }
            gridDetalles.setModel(_data);
            valorTotal1.setText("$ "+Integer.toString(totalFactura));
        }
    }

    /**
     * guardarMovimiento
     * Asigna un nuevo detalle al Movimiento del Cliente seleccionado
     */
    private void guardarMovimiento(){
        if(!cedula.getText().equals("")){
            MovimientoDetalles detalles = new MovimientoDetalles();
            detalles.setCantidad(Integer.parseInt(cantidad.getText()));
            detalles.setValorTotal((Integer.parseInt(cantidad.getText()) * Integer.parseInt(valorUnitario.getText()) * Integer.parseInt(iva.getText()) / 100) + Integer.parseInt(valorUnitario.getText())*Integer.parseInt(cantidad.getText()));
            String s = ListaServicios.getSelectedItem().toString();
            detalles.setServicios(controlS.getServicioByNombre(s));//El servicio
            Clientes c = controlC.getclienteByCC(Integer.parseInt(documento.getText()));
            detalles.setCliente(c);//El Cliente
            detalles.setMovimiento(movimiento);

            FramePrincipal1.sistema.addMovimientoDetalle(detalles);
            cargarServiciosConsumidos(c.getCedula());
        }else JOptionPane.showMessageDialog(this, "No se ha seleccionado ningún cliente.");
    }


    /** This method is called from within the constructor to
     * initialize the form.
     * WARNING: Do NOT modify this code. The content of this method is
     * always regenerated by the Form Editor.
     */
    @SuppressWarnings("unchecked")
    // <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents
    private void initComponents() {

        jLabel11 = new javax.swing.JLabel();
        jLabel12 = new javax.swing.JLabel();
        nombreCliente = new javax.swing.JFormattedTextField();
        documento = new javax.swing.JFormattedTextField();
        buscarCliente = new javax.swing.JButton();
        jLabel1 = new javax.swing.JLabel();
        ListaTiposServicios = new javax.swing.JComboBox();
        jLabel14 = new javax.swing.JLabel();
        fechaEntrada = new javax.swing.JFormattedTextField();
        jScrollPane1 = new javax.swing.JScrollPane();
        gridDetalles = new javax.swing.JTable();
        guardarMovimiento = new javax.swing.JButton();
        valorTotal = new javax.swing.JLabel();
        jLabel18 = new javax.swing.JLabel();
        jLabel16 = new javax.swing.JLabel();
        cantidad = new javax.swing.JFormattedTextField();
        jLabel2 = new javax.swing.JLabel();
        jSeparator1 = new javax.swing.JSeparator();
        jSeparator2 = new javax.swing.JSeparator();
        jLabel3 = new javax.swing.JLabel();
        jLabel4 = new javax.swing.JLabel();
        jLabel5 = new javax.swing.JLabel();
        ListaServicios = new javax.swing.JComboBox();
        jLabel6 = new javax.swing.JLabel();
        iva = new javax.swing.JTextField();
        jLabel7 = new javax.swing.JLabel();
        jLabel9 = new javax.swing.JLabel();
        valorUnitario = new javax.swing.JTextField();
        jLabel10 = new javax.swing.JLabel();
        jSeparator3 = new javax.swing.JSeparator();
        jLabel13 = new javax.swing.JLabel();
        jLabel17 = new javax.swing.JLabel();
        valorTotal1 = new javax.swing.JLabel();
        cedula = new javax.swing.JLabel();

        jLabel11.setText("Documento Cliente");

        jLabel12.setText("Nombre del Cliente");

        nombreCliente.setEditable(false);

        buscarCliente.setText("Buscar");
        buscarCliente.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                buscarClienteActionPerformed(evt);
            }
        });

        jLabel1.setText("Concepto");

        ListaTiposServicios.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                ListaTiposServiciosActionPerformed(evt);
            }
        });

        jLabel14.setText("Fecha de Entrada");

        fechaEntrada.setEditable(false);
        fechaEntrada.setHorizontalAlignment(javax.swing.JTextField.RIGHT);

        gridDetalles.setModel(new javax.swing.table.DefaultTableModel(
            new Object [][] {

            },
            new String [] {
                "Servicio", "Cantidad", "Valor", "Total"
            }
        ) {
            Class[] types = new Class [] {
                java.lang.String.class, java.lang.Object.class, java.lang.Object.class, java.lang.Object.class
            };

            public Class getColumnClass(int columnIndex) {
                return types [columnIndex];
            }
        });
        jScrollPane1.setViewportView(gridDetalles);

        guardarMovimiento.setText("Guardar Movimiento");
        guardarMovimiento.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                guardarMovimientoActionPerformed(evt);
            }
        });

        valorTotal.setFont(new java.awt.Font("Tahoma", 1, 10));
        valorTotal.setHorizontalAlignment(javax.swing.SwingConstants.RIGHT);
        valorTotal.setText("$ 0");

        jLabel18.setText("Cantidad");

        jLabel16.setText("Valor Total");

        cantidad.setHorizontalAlignment(javax.swing.JTextField.RIGHT);
        cantidad.setText("1");

        jLabel2.setFont(new java.awt.Font("Tahoma", 1, 14));
        jLabel2.setForeground(new java.awt.Color(0, 102, 51));
        jLabel2.setText("Sistema de Facturación Hotelero");

        jLabel3.setFont(new java.awt.Font("Tahoma", 1, 14));
        jLabel3.setForeground(new java.awt.Color(0, 102, 51));
        jLabel3.setText("Datos de la Factura");

        jLabel4.setFont(new java.awt.Font("Tahoma", 1, 14));
        jLabel4.setForeground(new java.awt.Color(0, 102, 51));
        jLabel4.setText("Detalle de Movimientos");

        jLabel5.setText("Servicio");

        ListaServicios.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                ListaServiciosActionPerformed(evt);
            }
        });

        jLabel6.setText("Iva");

        iva.setEditable(false);
        iva.setHorizontalAlignment(javax.swing.JTextField.RIGHT);

        jLabel7.setFont(new java.awt.Font("Tahoma", 1, 24));
        jLabel7.setForeground(new java.awt.Color(0, 102, 51));
        jLabel7.setText("La Potra Hotel Campestre");

        jLabel9.setText("Valor Unitario");

        valorUnitario.setHorizontalAlignment(javax.swing.JTextField.RIGHT);

        jLabel10.setFont(new java.awt.Font("Tahoma", 1, 14));
        jLabel10.setForeground(new java.awt.Color(0, 102, 51));
        jLabel10.setText("Detalle de Costos");

        jLabel13.setFont(new java.awt.Font("Tahoma", 1, 14));
        jLabel13.setForeground(new java.awt.Color(0, 102, 51));
        jLabel13.setText("Movimientos Registrados");

        jLabel17.setFont(new java.awt.Font("Tahoma", 1, 12));
        jLabel17.setForeground(new java.awt.Color(0, 102, 51));
        jLabel17.setText("Valor Total Factura");

        valorTotal1.setFont(new java.awt.Font("Tahoma", 1, 12));
        valorTotal1.setForeground(new java.awt.Color(0, 102, 51));
        valorTotal1.setHorizontalAlignment(javax.swing.SwingConstants.RIGHT);
        valorTotal1.setText("$ 0");

        cedula.setForeground(new java.awt.Color(240, 240, 240));
        cedula.setText("jLabel8");

        javax.swing.GroupLayout layout = new javax.swing.GroupLayout(this);
        this.setLayout(layout);
        layout.setHorizontalGroup(
            layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(layout.createSequentialGroup()
                .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, layout.createSequentialGroup()
                        .addContainerGap()
                        .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)
                            .addComponent(jScrollPane1, javax.swing.GroupLayout.Alignment.LEADING, javax.swing.GroupLayout.DEFAULT_SIZE, 603, Short.MAX_VALUE)
                            .addComponent(jSeparator2, javax.swing.GroupLayout.Alignment.LEADING, javax.swing.GroupLayout.DEFAULT_SIZE, 603, Short.MAX_VALUE)
                            .addComponent(jLabel7, javax.swing.GroupLayout.Alignment.LEADING)
                            .addComponent(jLabel2, javax.swing.GroupLayout.Alignment.LEADING)
                            .addComponent(jLabel13, javax.swing.GroupLayout.Alignment.LEADING)
                            .addGroup(javax.swing.GroupLayout.Alignment.LEADING, layout.createSequentialGroup()
                                .addComponent(jLabel11)
                                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                                .addComponent(documento, javax.swing.GroupLayout.PREFERRED_SIZE, 119, javax.swing.GroupLayout.PREFERRED_SIZE)
                                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                                .addComponent(buscarCliente)
                                .addGap(18, 18, 18)
                                .addComponent(cedula))
                            .addGroup(layout.createSequentialGroup()
                                .addComponent(jLabel12)
                                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                                .addComponent(nombreCliente, javax.swing.GroupLayout.DEFAULT_SIZE, 509, Short.MAX_VALUE))
                            .addGroup(layout.createSequentialGroup()
                                .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                                    .addComponent(jLabel1)
                                    .addComponent(jLabel5)
                                    .addComponent(jLabel14))
                                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                                .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false)
                                    .addComponent(fechaEntrada)
                                    .addComponent(ListaTiposServicios, 0, 199, Short.MAX_VALUE)
                                    .addComponent(ListaServicios, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                                .addGap(146, 146, 146)
                                .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                                    .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, layout.createSequentialGroup()
                                        .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                                            .addComponent(jLabel6)
                                            .addComponent(jLabel18)
                                            .addComponent(jLabel9)
                                            .addComponent(jLabel16))
                                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, 17, Short.MAX_VALUE)
                                        .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false)
                                            .addComponent(cantidad, javax.swing.GroupLayout.Alignment.TRAILING)
                                            .addComponent(valorUnitario, javax.swing.GroupLayout.Alignment.TRAILING, javax.swing.GroupLayout.DEFAULT_SIZE, 88, Short.MAX_VALUE)
                                            .addComponent(iva, javax.swing.GroupLayout.Alignment.TRAILING)
                                            .addComponent(valorTotal, javax.swing.GroupLayout.Alignment.TRAILING, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)))
                                    .addComponent(jLabel10)))
                            .addComponent(jLabel4, javax.swing.GroupLayout.Alignment.LEADING)
                            .addComponent(guardarMovimiento, javax.swing.GroupLayout.DEFAULT_SIZE, 603, Short.MAX_VALUE)
                            .addComponent(jSeparator1, javax.swing.GroupLayout.Alignment.LEADING, javax.swing.GroupLayout.DEFAULT_SIZE, 603, Short.MAX_VALUE)
                            .addComponent(jSeparator3, javax.swing.GroupLayout.DEFAULT_SIZE, 603, Short.MAX_VALUE)
                            .addComponent(jLabel3, javax.swing.GroupLayout.Alignment.LEADING)))
                    .addGroup(layout.createSequentialGroup()
                        .addGap(413, 413, 413)
                        .addComponent(jLabel17)
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                        .addComponent(valorTotal1, javax.swing.GroupLayout.DEFAULT_SIZE, 75, Short.MAX_VALUE)))
                .addContainerGap())
        );
        layout.setVerticalGroup(
            layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(layout.createSequentialGroup()
                .addContainerGap()
                .addComponent(jLabel7)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addComponent(jLabel2)
                .addGap(15, 15, 15)
                .addComponent(jSeparator2, javax.swing.GroupLayout.PREFERRED_SIZE, 10, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addGap(1, 1, 1)
                .addComponent(jLabel3)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(jLabel11)
                    .addComponent(documento, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(buscarCliente)
                    .addComponent(cedula))
                .addGap(18, 18, 18)
                .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(nombreCliente, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(jLabel12))
                .addGap(18, 18, 18)
                .addComponent(jSeparator1, javax.swing.GroupLayout.PREFERRED_SIZE, 10, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addGap(2, 2, 2)
                .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addGroup(layout.createSequentialGroup()
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                        .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                            .addComponent(jLabel4)
                            .addComponent(jLabel10))
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                        .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                            .addComponent(ListaTiposServicios, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                            .addComponent(jLabel1))
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                        .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                            .addComponent(ListaServicios, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                            .addComponent(jLabel5))
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                        .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                            .addComponent(jLabel14)
                            .addComponent(fechaEntrada, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)))
                    .addGroup(layout.createSequentialGroup()
                        .addGap(34, 34, 34)
                        .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                            .addComponent(valorUnitario, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                            .addComponent(jLabel9))
                        .addGap(11, 11, 11)
                        .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                            .addComponent(cantidad, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                            .addComponent(jLabel18))
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                        .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                            .addComponent(iva, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                            .addComponent(jLabel6))
                        .addGap(9, 9, 9)
                        .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                            .addComponent(valorTotal)
                            .addComponent(jLabel16))))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                .addComponent(guardarMovimiento)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                .addComponent(jSeparator3, javax.swing.GroupLayout.PREFERRED_SIZE, 10, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addComponent(jLabel13)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addComponent(jScrollPane1, javax.swing.GroupLayout.PREFERRED_SIZE, 126, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(valorTotal1)
                    .addComponent(jLabel17))
                .addContainerGap())
        );
    }// </editor-fold>//GEN-END:initComponents

    private void buscarClienteActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_buscarClienteActionPerformed
        buscarCliente();
}//GEN-LAST:event_buscarClienteActionPerformed

    private void ListaTiposServiciosActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_ListaTiposServiciosActionPerformed
        int id = 0;
        for(TiposServicios t : FramePrincipal1.sistema.getTiposServicios()){
            if(t.getNombre() == ListaTiposServicios.getSelectedItem()) id = t.getId();
        }
        cargarListaServicios(id);
}//GEN-LAST:event_ListaTiposServiciosActionPerformed

    private void guardarMovimientoActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_guardarMovimientoActionPerformed
        guardarMovimiento();
}//GEN-LAST:event_guardarMovimientoActionPerformed

    private void ListaServiciosActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_ListaServiciosActionPerformed
        verInfoServicio();
    }//GEN-LAST:event_ListaServiciosActionPerformed
    // Variables declaration - do not modify//GEN-BEGIN:variables
    private javax.swing.JComboBox ListaServicios;
    private javax.swing.JComboBox ListaTiposServicios;
    private javax.swing.JButton buscarCliente;
    private javax.swing.JFormattedTextField cantidad;
    private javax.swing.JLabel cedula;
    private javax.swing.JFormattedTextField documento;
    private javax.swing.JFormattedTextField fechaEntrada;
    private javax.swing.JTable gridDetalles;
    private javax.swing.JButton guardarMovimiento;
    private javax.swing.JTextField iva;
    private javax.swing.JLabel jLabel1;
    private javax.swing.JLabel jLabel10;
    private javax.swing.JLabel jLabel11;
    private javax.swing.JLabel jLabel12;
    private javax.swing.JLabel jLabel13;
    private javax.swing.JLabel jLabel14;
    private javax.swing.JLabel jLabel16;
    private javax.swing.JLabel jLabel17;
    private javax.swing.JLabel jLabel18;
    private javax.swing.JLabel jLabel2;
    private javax.swing.JLabel jLabel3;
    private javax.swing.JLabel jLabel4;
    private javax.swing.JLabel jLabel5;
    private javax.swing.JLabel jLabel6;
    private javax.swing.JLabel jLabel7;
    private javax.swing.JLabel jLabel9;
    private javax.swing.JScrollPane jScrollPane1;
    private javax.swing.JSeparator jSeparator1;
    private javax.swing.JSeparator jSeparator2;
    private javax.swing.JSeparator jSeparator3;
    private javax.swing.JFormattedTextField nombreCliente;
    private javax.swing.JLabel valorTotal;
    private javax.swing.JLabel valorTotal1;
    private javax.swing.JTextField valorUnitario;
    // End of variables declaration//GEN-END:variables
}
